# This is a BitKeeper generated patch for the following project: # Project Name: Linux kernel tree # This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas: # ChangeSet 1.676.14.40 -> 1.676.14.41 # drivers/net/eepro100.c 1.34 -> 1.34.1.1 # # The following is the BitKeeper ChangeSet Log # -------------------------------------------- # 02/09/27 bjorn_helgaas@hp.com 1.676.14.41 # eepro100: last_rx_time fix. # -------------------------------------------- # diff -Nru a/drivers/net/eepro100.c b/drivers/net/eepro100.c --- a/drivers/net/eepro100.c Wed Oct 8 09:07:36 2003 +++ b/drivers/net/eepro100.c Wed Oct 8 09:07:36 2003 @@ -1747,6 +1747,7 @@ int entry = sp->cur_rx % RX_RING_SIZE; int rx_work_limit = sp->dirty_rx + RX_RING_SIZE - sp->cur_rx; int alloc_ok = 1; + int npkts = 0; if (speedo_debug > 4) printk(KERN_DEBUG " In speedo_rx().\n"); @@ -1813,6 +1814,7 @@ memcpy(skb_put(skb, pkt_len), sp->rx_skbuff[entry]->tail, pkt_len); #endif + npkts++; } else { /* Pass up the already-filled skbuff. */ skb = sp->rx_skbuff[entry]; @@ -1823,6 +1825,7 @@ } sp->rx_skbuff[entry] = NULL; skb_put(skb, pkt_len); + npkts++; sp->rx_ringp[entry] = NULL; pci_unmap_single(sp->pdev, sp->rx_ring_dma[entry], PKT_BUF_SZ + sizeof(struct RxFD), PCI_DMA_FROMDEVICE); @@ -1843,7 +1846,8 @@ /* Try hard to refill the recently taken buffers. */ speedo_refill_rx_buffers(dev, 1); - sp->last_rx_time = jiffies; + if (npkts) + sp->last_rx_time = jiffies; return 0; }